package com.jg.visitor.config.exception;

import com.jg.visitor.common.bean.ServiceCode;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
public class JgException extends RuntimeException{
    private static final long serialVersionUID = 1L;

    private final ServiceCode errorCode;

    public JgException(ServiceCode serviceCode){
        super(serviceCode.getMsg());
        this.errorCode = serviceCode;
    }

}
